<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>统一认证中心</title>

    <#import "../common/common.macro.ftl" as netCommon>
    <@netCommon.commonStyle />

</head>
<body class="hold-transition login-page">

<div class="login-box">
    <form id="openApiForm" >
        <div class="login-box-body">
            <p class="login-box-msg">添加授权信息</p>
            <div id="appIddiv" class="form-group">
                <label>APP ID</label>
                <select id="appId" name="appId" class="form-control select2" data-placeholder="Select a State" style="width: 100%;">
                    <option  value=""></option>
                    <#list apps as item>
                        <option  value="${item.appId}">${item.appId}</option>
                    </#list>
                </select>
                <span id="appIdMsg" class="help-block"></span>
            </div>
            <div id="appKeydiv" class="form-group">
                <label>API KEY</label>
                <div class="input-group">
                    <input readonly id="appKey" type="text" class="form-control" name="appKey">
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-info btn-flat" onclick="createKey()">生成</button>
                    </span>
                </div>
                <span id="appKeyMsg" class="help-block"></span>
            </div>
            <div class="form-group">
                <label>备注</label>
                <input id="remark" type="text" class="form-control" name="remark">
            </div>
            <div class="row">
                <div class="col-xs-4">
                    <button onclick="addOpenApi()" type="button" class="btn btn-primary btn-block btn-flat">提交</button>
                </div>
            </div>
        </div>
    </form>
</div>

</body>
<@netCommon.commonScript />
<script src="${request.contextPath}/static/js/manage.js"></script>
</html>